cmake_minimum_required(VERSION 3.8)
project(string_substring)

set(var "The quick brown fox jumps over the lazy dog!")
message(STATUS "var = ${var}")

string(SUBSTRING ${var} 4 15 var1)
message(STATUS "var1 = ${var1}")

string(SUBSTRING ${var} 4 -1 var2)
message(STATUS "var2 = ${var2}")

string(SUBSTRING ${var} 4 100 var3)
message(STATUS "var3 = ${var3}")
